package com.github.catvod.spider;

import android.text.TextUtils;
import com.github.catvod.crawler.Spider;
import com.github.catvod.crawler.SpiderDebug;
import com.github.catvod.parser.C0000;
import com.github.catvod.parser.C0001;
import com.github.catvod.parser.C0003;
import com.github.catvod.parser.C0004;
import com.github.catvod.parser.C0005;
import com.github.catvod.parser.C0006;
import com.github.catvod.parser.C0007;
import com.github.catvod.parser.C0008;
import com.github.catvod.parser.C0009;
import com.github.catvod.spider.merge.C0011;
import com.github.catvod.spider.merge.C0012;
import com.github.catvod.spider.merge.C0014;
import com.github.catvod.spider.merge.C0015;
import com.github.catvod.spider.merge.Dv;
import com.github.catvod.spider.merge.HZ;
import com.github.catvod.spider.merge.JL;
import com.github.catvod.spider.merge.L;
import com.github.catvod.spider.merge.Lm;
import com.github.catvod.spider.merge.au;
import com.github.catvod.spider.merge.fP;
import com.github.catvod.spider.merge.lk;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.StringReader;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import okhttp3.Call;
import okhttp3.Response;
import org.json.JSONArray;
import org.json.JSONObject;

/* loaded from: classes.dex */
public class Ddrk extends Spider {

    /* renamed from: short, reason: not valid java name */
    private static final short[] f18short = {1673, 1733, 1735, 1746, 1731, 1729, 1737, 1748, 1759, 1673, 1678, 1786, 1781, 1677, 1679, 1673, 2318, 2322, 2322, 2326, 2325, 2396, 2377, 2377, 2306, 2306, 2335, 2325, 2376, 2326, 2324, 2313, 2377, 2382, 2362, 2357, 2381, 2383, 2377, 2391, 2392, 2336, 2340, 2427, 2410, 2412, 2414, 2340, 2339, 2391, 2392, 2336, 2338, 2391, 2392, 2336, 2218, 2213, 2269, 2270, 2206, 2178, 2178, 2182, 2218, 2213, 2269, 2193, 2271, 1689, 1686, 1774, 1773, 1771, 1775, 1772, 1770, 1740, 1754, 1741, 1682, 1790, 1752, 1754, 1745, 1739, 1035, 1126, 1092, 1105, 1090, 1095, 1095, 1098, 1028, 1054, 1029, 1051, 1035, 1027, 1126, 1098, 1096, 1090, 1093, 1119, 1092, 1112, 1091, 1040, 1035, 1122, 1093, 1119, 1102, 1095, 1035, 1126, 1098, 1096, 1035, 1124, 1144, 1035, 1139, 1035, 1050, 1051, 1140, 1050, 1054, 1140, 1052, 1026, 1035, 1130, 1115, 1115, 1095, 1102, 1148, 1102, 1097, 1120, 1090, 1119, 1028, 1054, 1048, 1052, 1029, 1048, 1053, 1035, 1027, 1120, 1123, 1151, 1126, 1127, 1031, 1035, 1095, 1090, 1088, 1102, 1035, 1132, 1102, 1096, 1088, 1092, 1026, 1035, 1128, 1091, 1113, 1092, 1094, 1102, 1028, 1042, 1050, 1029, 1051, 1029, 1055, 1055, 1052, 1049, 1029, 1050, 1050, 1055, 1035, 1144, 1098, 1101, 1098, 1113, 1090, 1028, 1054, 1048, 1052, 1029, 1048, 1053, 1443, 1428, 1431, 1428, 1411, 1428, 1411, 1260, 1188, 1208, 1208, 1212, 1215, 1270, 1251, 1251, 1192, 1192, 1205, 1215, 1250, 1212, 1214, 1187, 1251, 1811, 1794, 1794, 1822, 1819, 1809, 1811, 1798, 1819, 1821, 1820, 1885, 1821, 1809, 1798, 1815, 1798, 1887, 1793, 1798, 1792, 1815, 1811, 1823, 632, 618, 621, 633, 635, 635, 1889, 1813, 1837, 1842, 1915, 1844, 1907, 1813, 1837, 1842, 1915, 1844, 1907, 1813, 1837, 1842, 1915, 1844, 1895, 1813, 1837, 1842, 1914, 1844, 1895, 1890, 1813, 1837, 1842, 1915, 1844, 1907, 1813, 1837, 1842, 1915, 1844, 1907, 1813, 1837, 1842, 1915, 1844, 1895, 1813, 1837, 1842, 1914, 1844, 1888, 1895, 1891, 1522, 1511, 1501, 1449, 1425, 1422, 1479, 1416, 1487, 1449, 1425, 1422, 1479, 1416, 1499, 1449, 1425, 1422, 1478, 1416, 1500, 1499, 1503, 1482, 1501, 1493, 1496, 1496, 1483, 1493, 1500, 1501, 1449, 1425, 1422, 1479, 1416, 1487, 1449, 1425, 1422, 1479, 1416, 1499, 1449, 1425, 1422, 1478, 1416, 1500, 1499, 1503, 2491, 2491, 2481, 2479, 2490, 2479, 2489, 2491, 2491, 2481, 2479, 2488, 2809, 2753, 2782, 2711, 2776, 2719, 2809, 2753, 2782, 2711, 2776, 2719, 2809, 2753, 2782, 2711, 2776, 2699, 2809, 2753, 2782, 2710, 2776, 2699, 2702, 2809, 2753, 2782, 2711, 2776, 2719, 2809, 2753, 2782, 2711, 2776, 2719, 2809, 2753, 2782, 2711, 2776, 2699, 2809, 2753, 2782, 2710, 2776, 2737, 847, 870, 750, 666, 666, 691, 750, 666, 694, 701, 670, 642, 687, 673, 687, 690, 699, 701, 754, 699, 751, 751, 2567, 2649, 2630, 2650, 2653, 2564, 2635, 2630, 2641, 2564, 2653, 2624, 2653, 2629, 2636, 2569, 2632, 2890, 1286, 1306, 1306, 1310, 1309, 1364, 1345, 1345, 1290, 1290, 1303, 1309, 1344, 1310, 1308, 1281, 1345, 1293, 1295, 1306, 1291, 1289, 1281, 1308, 1303, 1345, 3057, 2245, 1306, 1349, 1364, 1362, 1360, 1306, 2953, 2948, 2971, 3011, 2947, 2956, 2971, 3008, 2945, 2948, 2947, 2950, 2974, 867, 889, 878, 877, 773, 1312, 1325, 1330, 1386, 1322, 1317, 1330, 1385, 1320, 1325, 1322, 1327, 1335, 1380, 1317, 1148, 1151, 1134, 1121, 1057, 1132, 1146, 1149, 1149, 1130, 1121, 1147, 24719, 27431, 28240, 24094, 27782, 27869, -31313, 31402, 29437, 27570, 22728, 1333, 1336, 1319, 1407, 1313, 1342, 1314, 1317, 1404, 1331, 1342, 1321, 1404, 1330, 1342, 1343, 1317, 1328, 1336, 1343, 1332, 1315, 1107, 1070, 1079, 1084, 1031, 1066, 1085, 1077, 1081, 1066, 1075, 1067, 1638, 1663, 1652, 1615, 1632, 1657, 1651, 2876, 2853, 2862, 2837, 2852, 2859, 2855, 2863, 2176, 2201, 2194, 2217, 2207, 2194, 1286, 1281, 1292, 1305, 1296, 382, 288, 319, 291, 292, 381, 306, 319, 296, 381, 313, 317, 305, 311, 309, 2086, 2130, 1928, 753, 736, 742, 740, 1312, 1329, 1335, 1333, 1331, 1343, 1317, 1342, 1316, 1679, 1674, 1678, 1674, 1687, 661, 654, 661, 640, 653, 1231, 1226, 1232, 1239, 2182, 2182, 2182, 1928, 2001, 2006, 1931, 2006, 1994, 1991, 2015, 1994, 1999, 2005, 2002, 1931, 2005, 1989, 2004, 1999, 2006, 2002, 1956, 520, 532, 532, 528, 531, 602, 591, 591, 516, 516, 537, 531, 590, 528, 530, 527, 591, 2735, 816, 829, 802, 890, 804, 827, 807, 800, 884, 829, 825, 819, 1806, 1807, 1822, 1920, 2009, 1990, 1944, 1927, 1947, 1948, 1989, 1948, 1921, 1948, 1924, 1933, 1894, 1919, 1908, 1871, 1890, 1909, 1917, 1905, 1890, 1915, 1891, 1449, 1456, 1467, 1408, 1457, 1470, 1458, 1466, 1287, 1395, 1278, 1251, 1255, 1263, 23004, 2720, 2733, 2738, 2794, 2725, 2726, 2743, 2736, 2742, 2725, 2727, 2736, 2041, 2818, 2908, 2892, 2816, 3088, 3164, 3090, 3088, 3075, 3164, 3090, 32653, 21629, 972, 990, 984, 988, 991, 20928, 22525, 18292, 2483, 2465, 2471, 2467, 2464, 29193, 20637, 21655, 1943, 1925, 1923, 1927, 1924, 23001, 18768, 26505, 23749, 2215, 2229, 2227, 2231, 2228, 29926, 20931, 25899, 2565, 2583, 2577, 2581, 2582, 25899, 29161, 17570, 2643, 2625, 2631, 2627, 2624, 1585, 1576, 1571, 1560, 1582, 1571, 1044, 1037, 1030, 1085, 1042, 1035, 1025, 31949, 2000, 23682, 2681, 1413, 2026, 2028, 2043, 2026, 2027, 2042, 2274, 2302, 2302, 2298, 2297, 2224, 2213, 2213, 2286, 2286, 2291, 2297, 2212, 2298, 2296, 2277, 2213, 2297, 2303, 2280, 2286, 2286, 2296, 2213, 438, 426, 426, 430, 429, 484, 497, 497, 424, 496, 442, 442, 423, 429, 496, 430, 428, 433, 3191, 3189, 3172, 3168, 3197, 3195, 3194, 2158, 2159, 2174, 2093, 329, 1288, 1294, 1309, 1311, 1303, 1295, 1781, 1707, 1716, 1704, 1711, 1782, 1707, 1722, 1724, 1726, 1782, 1717, 1710, 1718, 1721, 1726, 1705, 1704, 32683, 22437, 961, 984, 979, 1000, 967, 987, 982, 974, 1000, 977, 965, 984, 986, 1743, 1750, 1757, 1766, 1737, 1749, 1752, 1728, 1766, 1740, 1739, 1749, 792, 797, 775, 768, 1743, 1681, 1678, 1682, 1685, 1740, 1667, 1678, 1689, 1740, 1685, 1672, 1685, 1677, 1668, 1729, 1664, 2457, 2437, 2437, 2433, 2434, 2507, 2526, 2526, 2453, 2453, 2440, 2434, 2527, 2433, 2435, 2462, 2526, 591, 586, 525, 
    590, 582, 589, 598, 526, 586, 599, 582, 590, 515, 578, 3089, 3083, 3100, 3103, 2806, 2795, 2806, 2798, 2791, 31067, 28566, 18331, 26884, 32173, 20548, 24863, 22173, -28184, 21606, 22999, -32396, 22782, 20507, 20411, 22109, 21079, 22639, -26129, 26379, 29602, 31001, 21341, 24656, -28068, 28800, 23236, 22504, -28853, 29075, 23511, 25295, 29205, 23467, 31800, 30358, 22377, 31355, 29239, -29007, 1488, 1501, 1492, 1473, 1531, 1485, 1472, 3301, 3304, 3297, 3316, 3278, 3327, 3312, 3324, 3316, 581, 586, 591, 599, 582, 593, 592, 1628, 1619, 1630, 1612, 1612, 2367, 2354, 2349, 2421, 2347, 2356, 2344, 2351, 2422, 2361, 2356, 2339, 2422, 2360, 2356, 2357, 2351, 2362, 2354, 2357, 2366, 2345, 327, 2248, 2257, 2266, 2273, 2252, 2267, 2259, 2271, 2252, 2261, 2253, 2760, 2769, 2778, 2785, 2766, 2775, 2781, 1117, 1092, 1103, 1140, 1093, 1098, 1094, 1102, 2155, 2162, 2169, 2114, 2164, 2169, 511, 504, 501, 480, 489, 1979, 2021, 2042, 2022, 2017, 1976, 2039, 2042, 2029, 1976, 2044, 2040, 2036, 2034, 2032, 2346, 2398, 2355, 2208, 2213, 2239, 2232, 3089, 3127, 3105, 3126, 3177, 3077, 3107, 3105, 3114, 3120, 2919, 2826, 2856, 2877, 2862, 2859, 2859, 2854, 2920, 2930, 2921, 2935, 2919, 2927, 2832, 2862, 2857, 2851, 2856, 2864, 2868, 2919, 2825, 2835, 2919, 2934, 2935, 2921, 2935, 2940, 2919, 2832, 2862, 2857, 2929, 2931, 2940, 2919, 2879, 2929, 2931, 2926, 2919, 2822, 2871, 2871, 2859, 2850, 2832, 2850, 2853, 2828, 2862, 2867, 2920, 2930, 2932, 2928, 2921, 2932, 2929, 2919, 2927, 2828, 2831, 2835, 2826, 2827, 2923, 2919, 2859, 2862, 2860, 2850, 2919, 2816, 2850, 2852, 2860, 2856, 2926, 2919, 2820, 2863, 2869, 2856, 2858, 2850, 2920, 2934, 2934, 2934, 2921, 2935, 2921, 2935, 2921, 2935, 2919, 2836, 2854, 2849, 2854, 2869, 2862, 2920, 2930, 2932, 2928, 2921, 2932, 2929, 2919, 2818, 2851, 2848, 2920, 2934, 2934, 2934, 2921, 2935, 2921, 2934, 2929, 2929, 2934, 2921, 2931, 2931, 1773, 1754, 1753, 1754, 1741, 1754, 1741, 3120, 3192, 3172, 3172, 3168, 3171, 3114, 3135, 3135, 3188, 3188, 3177, 3171, 3134, 3168, 3170, 3199, 3135, 2833, 2865, 1257, 1246, 1245, 1246, 1225, 1246, 1225, 2356, 2344, 2344, 2348, 2351, 2406, 2419, 2419, 2360, 2360, 2341, 2351, 2418, 2348, 2350, 2355, 657, 640, 659, 658, 644, 3151, 3155, 3166, 3142, 3178, 3149, 3155, 1853, 1850, 1828, 1762, 1775, 1771, 1774, 1775, 1784, 793, 799, 776, 780, 1643, 1586, 1584, 1584, 1643, 1585, 1584, 1570, 1641, 1660, 2523, 2525, 2506, 2524, 560, 619, 608, 562, 619, 619, 637, 612, 553, 634, 637, 611, 562, 1565, 1607, 1621, 1556, 1982, 1954, 1954, 1958, 1957, 2028, 2041, 2041, 1970, 1970, 1967, 1957, 2040, 1958, 1956, 1977, 2041, 2025, 1957, 2027, 1280, 1366, 1353, 1365, 1362, 1401, 1362, 1375, 1366, 1347, 1307, 1366, 1353, 1365, 1362, 1668, 1673, 1686, 1742, 1680, 1679, 1683, 1684, 1741, 1667, 1679, 1678, 1684, 1669, 1678, 1684, 1829, 1832, 1847, 1903, 1828, 1839, 1845, 1843, 1848, 1900, 1826, 1838, 1839, 1845, 1828, 1839, 1845, 1889, 1841, 1819, 1793, 1814, 1813, 1438, 1415, 1420, 1463, 1409, 1420, 941, 948, 959, 900, 949, 954, 950, 958, 3151, 3158, 3165, 3174, 3145, 3152, 3162, 2596, 2621, 2614, 2573, 2592, 2615, 2623, 2611, 2592, 2617, 2593, 578, 583, 605, 602};
    protected JSONObject h;
    protected Pattern V0 = Pattern.compile(C0001.m3(f18short, 0, 16, 1702));
    protected Pattern j = Pattern.compile(C0005.m17(f18short, 16, 23, 2406));
    protected Pattern q = Pattern.compile(C0015.m47(f18short, 39, 17, 2315));
    protected Pattern I = Pattern.compile(C0008.m27(f18short, 56, 13, 2294));
    protected Pattern oC = Pattern.compile(C0007.m26(f18short, 69, 7, 1733));

    public Ddrk() {
        int m44 = C0014.m44();
        int i = 1616;
        while (true) {
            i ^= 1633;
            switch (i) {
                case 14:
                case 49:
                    i = m44 <= 0 ? 1709 : 1678;
                case 204:
                    System.out.println(Long.parseLong(C0008.m29("TMVOmLCoxLAFj4mNA9OtiDldk")));
                    break;
                case 239:
                    break;
            }
            return;
        }
    }

    private static String V0(Pattern pattern, String str) {
        int i = 1616;
        while (true) {
            i ^= 1633;
            switch (i) {
                case 14:
                case 49:
                    i = pattern == null ? 1709 : 1678;
                case 204:
                    return str;
                case 239:
                    try {
                        Matcher matcher = pattern.matcher(str);
                        boolean find = matcher.find();
                        int i2 = 1740;
                        while (true) {
                            i2 ^= 1757;
                            switch (i2) {
                                case 17:
                                    i2 = find ? 1833 : 1802;
                                case 54:
                                case 471:
                                    return str;
                                case 500:
                                    return matcher.group(1).trim();
                            }
                        }
                    } catch (Exception e) {
                        SpiderDebug.log(e);
                        return str;
                    }
                    break;
            }
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:36:0x0068, code lost:
    
        return r4;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    protected static java.util.HashMap<java.lang.String, java.lang.String> h() {
        /*
            r1 = 0
            java.lang.String r0 = "ۣۧۤ"
            r2 = r1
            r3 = r1
            r4 = r1
        L6:
            int r0 = com.github.catvod.parser.C0006.m20(r0)
            switch(r0) {
                case 1746968: goto L30;
                case 1750784: goto L3b;
                case 1751495: goto L68;
                case 1751526: goto L49;
                case 1751563: goto L1a;
                case 1751687: goto L56;
                case 1753633: goto L43;
                case 1753640: goto L26;
                case 1754380: goto L36;
                case 1754661: goto L5b;
                case 1755592: goto L2b;
                default: goto Ld;
            }
        Ld:
            r0 = 215(0xd7, float:3.01E-43)
            r1 = 18
            r5 = 1228(0x4cc, float:1.721E-42)
            java.lang.String r1 = com.github.catvod.spider.C0018.m56(r3, r0, r1, r5)
            java.lang.String r0 = "۟ۨۡ"
            goto L6
        L1a:
            r0 = 208(0xd0, float:2.91E-43)
            r2 = 7
            r5 = 1521(0x5f1, float:2.131E-42)
            java.lang.String r2 = com.github.catvod.parser.C0005.m17(r3, r0, r2, r5)
            java.lang.String r0 = "ۨۧۧ"
            goto L6
        L26:
            short[] r3 = com.github.catvod.spider.Ddrk.f18short
            java.lang.String r0 = "ۤ۠ۢ"
            goto L6
        L2b:
            short[] r3 = com.github.catvod.spider.Ddrk.f18short
            java.lang.String r0 = "ۦۢۦ"
            goto L6
        L30:
            r4.put(r2, r1)
            java.lang.String r0 = "ۤ۟ۢ"
            goto L6
        L36:
            short[] r3 = com.github.catvod.spider.Ddrk.f18short
            java.lang.String r0 = "ۧۨۦ"
            goto L6
        L3b:
            java.util.HashMap r4 = new java.util.HashMap
            r4.<init>()
            java.lang.String r0 = "ۦۦۨ"
            goto L6
        L43:
            r4.put(r2, r1)
            java.lang.String r0 = "ۤۥۨ"
            goto L6
        L49:
            r0 = 76
            r2 = 10
            r5 = 1727(0x6bf, float:2.42E-42)
            java.lang.String r2 = com.github.catvod.spider.merge.C0012.m37(r3, r0, r2, r5)
            java.lang.String r0 = "ۧ۟ۤ"
            goto L6
        L56:
            short[] r3 = com.github.catvod.spider.Ddrk.f18short
            java.lang.String r0 = "ۤۡۨ"
            goto L6
        L5b:
            r0 = 86
            r1 = 122(0x7a, float:1.71E-43)
            r5 = 1067(0x42b, float:1.495E-42)
            java.lang.String r1 = com.github.catvod.parser.C0003.m9(r3, r0, r1, r5)
            java.lang.String r0 = "ۦۦۡ"
            goto L6
        L68:
            return r4
        */
        throw new UnsupportedOperationException("Method not decompiled: com.github.catvod.spider.Ddrk.h():java.util.HashMap");
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:27:0x00d2. Please report as an issue. */
    public static Object[] loadsub(String str) {
        int i;
        try {
            L.Tw tw = new L.Tw() { // from class: com.github.catvod.spider.Ddrk.1
                {
                    int m54 = C0018.m54();
                    int i2 = 1616;
                    while (true) {
                        i2 ^= 1633;
                        switch (i2) {
                            case 14:
                            case 49:
                                i2 = m54 >= 0 ? 1709 : 1678;
                            case 204:
                                System.out.println(Float.decode(C0009.m31("bo")));
                                break;
                            case 239:
                                break;
                        }
                        return;
                    }
                }

                @Override // com.github.catvod.spider.merge.L
                protected void onFailure(Call call, Exception exc) {
                }

                /* JADX INFO: Access modifiers changed from: protected */
                @Override // com.github.catvod.spider.merge.L
                public String onResponse(Response response) {
                    return null;
                }
            };
            fP.q(fP.j(), str, null, h(), tw);
            Response result = tw.getResult();
            int code = result.code();
            String m52 = C0017.m52(f18short, 233, 24, 1906);
            int i2 = 1616;
            while (true) {
                i2 ^= 1633;
                switch (i2) {
                    case 14:
                    case 49:
                        i2 = code == 404 ? 1709 : 1678;
                    case 204:
                        return new Object[]{200, m52, new ByteArrayInputStream(C0000.m1(f18short, 257, 6, 559).getBytes())};
                    case 239:
                        byte[] bytes = result.body().bytes();
                        byte[] copyOfRange = Arrays.copyOfRange(bytes, 0, 16);
                        BufferedReader bufferedReader = new BufferedReader(new StringReader(au.h(JL.h(Arrays.copyOfRange(bytes, 16, bytes.length), copyOfRange, copyOfRange)).replaceAll(C0009.m30(f18short, 263, 52, 1865), C0017.m52(f18short, 315, 2, 1494)).replaceAll(C0000.m1(f18short, 317, 50, 1525), C0009.m30(f18short, 367, 12, 2443))));
                        ArrayList arrayList = new ArrayList();
                        int i3 = 1;
                        String readLine = bufferedReader.readLine();
                        while (true) {
                            int i4 = 1740;
                            while (true) {
                                i4 ^= 1757;
                                switch (i4) {
                                    case 17:
                                        i4 = readLine != null ? 1833 : 1802;
                                    case 54:
                                    case 471:
                                        break;
                                    case 500:
                                        boolean matches = readLine.matches(C0011.m35(f18short, 379, 48, 2725));
                                        int i5 = 1864;
                                        while (true) {
                                            i5 ^= 1881;
                                            switch (i5) {
                                                case 17:
                                                    i5 = matches ? 48736 : 48705;
                                                case 47384:
                                                    break;
                                                case 47417:
                                                    boolean isEmpty = ((String) arrayList.get(arrayList.size() - 1)).trim().isEmpty();
                                                    int i6 = 48767;
                                                    while (true) {
                                                        i6 ^= 48784;
                                                        switch (i6) {
                                                            case 14:
                                                            case 45:
                                                                break;
                                                            case 76:
                                                                arrayList.add(i3 + "");
                                                                i = i3 + 1;
                                                                break;
                                                            case 239:
                                                                i6 = isEmpty ? 48860 : 48829;
                                                        }
                                                    }
                                                    break;
                                                case 47483:
                                            }
                                        }
                                        i = i3;
                                        arrayList.add(readLine);
                                        String readLine2 = bufferedReader.readLine();
                                        int i7 = 48891;
                                        while (true) {
                                            i7 ^= 48908;
                                            switch (i7) {
                                                case 22:
                                                    break;
                                                case 503:
                                                    i7 = 48922;
                                                    break;
                                            }
                                        }
                                        readLine = readLine2;
                                        i3 = i;
                                        break;
                                }
                                return new Object[]{200, m52, new ByteArrayInputStream(TextUtils.join(C0003.m9(f18short, 427, 1, 2747), arrayList).getBytes())};
                            }
                        }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            SpiderDebug.log(e);
            return null;
        }
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:4:0x000f. Please report as an issue. */
    public static String stringToUnicode(String str) {
        StringBuffer stringBuffer = new StringBuffer();
        char[] charArray = str.toCharArray();
        int i = 0;
        while (true) {
            int length = charArray.length;
            int i2 = 1616;
            while (true) {
                i2 ^= 1633;
                switch (i2) {
                    case 14:
                    case 49:
                        i2 = i < length ? 1709 : 1678;
                    case 204:
                        stringBuffer.append(C0003.m9(f18short, 428, 2, 787) + Integer.toHexString(charArray[i]));
                        i++;
                        int i3 = 1740;
                        while (true) {
                            i3 ^= 1757;
                            switch (i3) {
                                case 17:
                                    i3 = 1771;
                                    break;
                                case 54:
                                    break;
                            }
                        }
                        break;
                    case 239:
                        break;
                }
                return stringBuffer.toString();
            }
        }
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:4:0x001c. Please report as an issue. */
    public static String unicodeToString(String str) {
        Matcher matcher = Pattern.compile(C0017.m52(f18short, 430, 20, 710)).matcher(str);
        while (true) {
            boolean find = matcher.find();
            int i = 1616;
            while (true) {
                i ^= 1633;
                switch (i) {
                    case 14:
                    case 49:
                        i = find ? 1709 : 1678;
                    case 204:
                        char parseInt = (char) Integer.parseInt(matcher.group(2), 16);
                        str = str.replace(matcher.group(1), parseInt + "");
                        int i2 = 1740;
                        while (true) {
                            i2 ^= 1757;
                            switch (i2) {
                                case 17:
                                    i2 = 1771;
                                    break;
                                case 54:
                                    break;
                            }
                        }
                        break;
                    case 239:
                        break;
                }
                return str;
            }
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:363:0x00e9, code lost:
    
        r4 = r6 + r25;
        r3 = 49914;
     */
    /* JADX WARN: Code restructure failed: missing block: B:364:0x00fd, code lost:
    
        r3 = r3 ^ 49931;
     */
    /* JADX WARN: Code restructure failed: missing block: B:365:0x0101, code lost:
    
        switch(r3) {
            case 497: goto L435;
            case 1711: goto L436;
            default: goto L437;
        };
     */
    /* JADX WARN: Code restructure failed: missing block: B:367:0x0105, code lost:
    
        r3 = 50596;
     */
    /* JADX WARN: Code restructure failed: missing block: B:371:0x0109, code lost:
    
        r3 = r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:62:0x01db, code lost:
    
        r3 = r4;
     */
    /* JADX WARN: Failed to find 'out' block for switch in B:160:0x042f. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:184:0x0469. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:213:0x04cc. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:22:0x0059. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:410:0x00e1. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:80:0x0301. Please report as an issue. */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public java.lang.String categoryContent(java.lang.String r25, java.lang.String r26, boolean r27, java.util.HashMap<java.lang.String, java.lang.String> r28) {
        /*
            Method dump skipped, instructions count: 1864
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: com.github.catvod.spider.Ddrk.categoryContent(java.lang.String, java.lang.String, boolean, java.util.HashMap):java.lang.String");
    }

    /*  JADX ERROR: JadxRuntimeException in pass: RegionMakerVisitor
        jadx.core.utils.exceptions.JadxRuntimeException: Failed to find switch 'out' block (already processed)
        	at jadx.core.dex.visitors.regions.maker.SwitchRegionMaker.calcSwitchOut(SwitchRegionMaker.java:202)
        	at jadx.core.dex.visitors.regions.maker.SwitchRegionMaker.process(SwitchRegionMaker.java:61)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:115)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:69)
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.makeEndlessLoop(LoopRegionMaker.java:281)
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.process(LoopRegionMaker.java:64)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:92)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:69)
        	at jadx.core.dex.visitors.regions.maker.SwitchRegionMaker.processFallThroughCases(SwitchRegionMaker.java:105)
        	at jadx.core.dex.visitors.regions.maker.SwitchRegionMaker.process(SwitchRegionMaker.java:64)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:115)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:69)
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.makeEndlessLoop(LoopRegionMaker.java:281)
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.process(LoopRegionMaker.java:64)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:92)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:69)
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.makeEndlessLoop(LoopRegionMaker.java:281)
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.process(LoopRegionMaker.java:64)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:92)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:69)
        	at jadx.core.dex.visitors.regions.maker.SwitchRegionMaker.processFallThroughCases(SwitchRegionMaker.java:105)
        	at jadx.core.dex.visitors.regions.maker.SwitchRegionMaker.process(SwitchRegionMaker.java:64)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:115)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:69)
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.makeEndlessLoop(LoopRegionMaker.java:281)
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.process(LoopRegionMaker.java:64)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:92)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:69)
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.makeEndlessLoop(LoopRegionMaker.java:281)
        	at jadx.core.dex.visitors.regions.maker.LoopRegionMaker.process(LoopRegionMaker.java:64)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.traverse(RegionMaker.java:92)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeRegion(RegionMaker.java:69)
        	at jadx.core.dex.visitors.regions.maker.RegionMaker.makeMthRegion(RegionMaker.java:49)
        	at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:25)
        */
    /* JADX WARN: Failed to find 'out' block for switch in B:108:0x0437. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:127:0x04cc. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:155:0x0519. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:159:0x05cd. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:183:0x05ac. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:35:0x0338. Please report as an issue. */
    public java.lang.String detailContent(java.util.List<java.lang.String> r33) {
        /*
            Method dump skipped, instructions count: 1816
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: com.github.catvod.spider.Ddrk.detailContent(java.util.List):java.lang.String");
    }

    /* JADX WARN: Code restructure failed: missing block: B:125:0x055e, code lost:
    
        r3 = 1509549;
     */
    /* JADX WARN: Code restructure failed: missing block: B:126:0x0561, code lost:
    
        r3 = r3 ^ 1509566;
     */
    /* JADX WARN: Code restructure failed: missing block: B:127:0x0565, code lost:
    
        switch(r3) {
            case 19: goto L345;
            case 114: goto L346;
            default: goto L347;
        };
     */
    /* JADX WARN: Code restructure failed: missing block: B:129:0x0569, code lost:
    
        r3 = 1509580;
     */
    /* JADX WARN: Failed to find 'out' block for switch in B:119:0x04cc. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:154:0x0502. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:442:0x02be. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:458:0x0347. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:471:0x030a. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:520:0x0294. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:7:0x0057. Please report as an issue. */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public java.lang.String homeContent(boolean r23) {
        /*
            Method dump skipped, instructions count: 2080
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: com.github.catvod.spider.Ddrk.homeContent(boolean):java.lang.String");
    }

    /* JADX WARN: Code restructure failed: missing block: B:36:0x0069, code lost:
    
        return r3;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    protected java.util.HashMap<java.lang.String, java.lang.String> j(java.lang.String r7) {
        /*
            r6 = this;
            r0 = 0
            java.lang.String r1 = "۠ۢۦ"
            r2 = r0
            r3 = r0
            r4 = r1
            r1 = r0
        L7:
            int r4 = com.github.catvod.parser.C0006.m20(r4)
            switch(r4) {
                case 56570: goto L41;
                case 1747748: goto L57;
                case 1748828: goto L69;
                case 1749601: goto L46;
                case 1751593: goto L21;
                case 1752645: goto L5f;
                case 1752737: goto L4b;
                case 1753484: goto L2e;
                case 1754629: goto L64;
                case 1755592: goto L1b;
                case 1755619: goto L34;
                default: goto Le;
            }
        Le:
            r1 = 1170(0x492, float:1.64E-42)
            r4 = 10
            r5 = 3140(0xc44, float:4.4E-42)
            java.lang.String r1 = com.github.catvod.parser.C0004.m12(r2, r1, r4, r5)
            java.lang.String r4 = "ۨۢ"
            goto L7
        L1b:
            r3.put(r1, r0)
            java.lang.String r4 = "ۢ۠۟"
            goto L7
        L21:
            r0 = 1180(0x49c, float:1.654E-42)
            r4 = 130(0x82, float:1.82E-43)
            r5 = 2887(0xb47, float:4.046E-42)
            java.lang.String r0 = com.github.catvod.parser.C0000.m1(r2, r0, r4, r5)
            java.lang.String r4 = "ۨۧۧ"
            goto L7
        L2e:
            r3.put(r1, r0)
            java.lang.String r4 = "ۡۦۡ"
            goto L7
        L34:
            r0 = 1317(0x525, float:1.846E-42)
            r4 = 18
            r5 = 3088(0xc10, float:4.327E-42)
            java.lang.String r0 = com.github.catvod.spider.merge.C0014.m43(r2, r0, r4, r5)
            java.lang.String r4 = "ۦۡۧ"
            goto L7
        L41:
            short[] r2 = com.github.catvod.spider.Ddrk.f18short
            java.lang.String r4 = "ۤۢۧ"
            goto L7
        L46:
            short[] r2 = com.github.catvod.spider.Ddrk.f18short
            java.lang.String r4 = "ۥۨۤ"
            goto L7
        L4b:
            r1 = 1310(0x51e, float:1.836E-42)
            r4 = 7
            r5 = 1727(0x6bf, float:2.42E-42)
            java.lang.String r1 = com.github.catvod.spider.C0017.m52(r2, r1, r4, r5)
            java.lang.String r4 = "ۧۧۥ"
            goto L7
        L57:
            java.util.HashMap r3 = new java.util.HashMap
            r3.<init>()
            java.lang.String r4 = "ۥۥۥ"
            goto L7
        L5f:
            short[] r2 = com.github.catvod.spider.Ddrk.f18short
            java.lang.String r4 = "ۦۤۨ"
            goto L7
        L64:
            short[] r2 = com.github.catvod.spider.Ddrk.f18short
            java.lang.String r4 = "ۣۨۨ"
            goto L7
        L69:
            return r3
        */
        throw new UnsupportedOperationException("Method not decompiled: com.github.catvod.spider.Ddrk.j(java.lang.String):java.util.HashMap");
    }

    public String playerContent(String str, String str2, List<String> list) {
        try {
            String[] split = str2.split(C0011.m35(f18short, 1335, 2, 2893));
            String str3 = split[0];
            String str4 = split[1];
            JSONObject jSONObject = new JSONObject();
            JSONObject jSONObject2 = new JSONObject();
            jSONObject2.put(C0017.m52(f18short, 1337, 7, 1211), C0012.m37(f18short, 1344, 16, 2396));
            jSONObject.put(C0018.m56(f18short, 1360, 5, 737), 0);
            jSONObject.put(C0018.m56(f18short, 1365, 7, 3135), "");
            jSONObject.put(C0006.m18(f18short, 1372, 3, 1864), str3);
            jSONObject.put(C0018.m56(f18short, 1375, 6, 1674), jSONObject2.toString());
            jSONObject.put(C0014.m43(f18short, 1381, 4, 874), C0015.m47(f18short, 1385, 10, 1604));
            jSONObject.put(C0001.m3(f18short, 1395, 4, 2472), Proxy.localProxyUrl() + C0017.m52(f18short, 1399, 13, 527) + URLEncoder.encode(str4));
            return jSONObject.toString();
        } catch (Exception e) {
            SpiderDebug.log(e);
            return "";
        }
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:39:0x00c8. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:47:0x0122. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:6:0x0069. Please report as an issue. */
    public String searchContent(String str, boolean z) {
        String m56 = C0018.m56(f18short, 1412, 4, 1653);
        try {
            String str2 = C0015.m47(f18short, 1416, 20, 2006) + URLEncoder.encode(str) + C0017.m52(f18short, 1436, 15, 1318);
            HZ h = lk.h(fP.oq(str2, j(str2)));
            JSONObject jSONObject = new JSONObject();
            JSONArray jSONArray = new JSONArray();
            Dv Pi = h.Pi(C0006.m18(f18short, 1451, 16, 1760));
            int i = 0;
            while (true) {
                int size = Pi.size();
                int i2 = 1616;
                while (true) {
                    i2 ^= 1633;
                    switch (i2) {
                        case 14:
                        case 49:
                            i2 = i < size ? 1709 : 1678;
                        case 204:
                            Lm lm = Pi.get(i);
                            String I = lm.Pi(m56).I();
                            String I2 = lm.Pi(C0009.m30(f18short, 1467, 19, 1857)).I();
                            Matcher matcher = this.j.matcher(lm.Pi(m56).h(C0004.m12(f18short, 1486, 4, 1907)));
                            boolean find = matcher.find();
                            int i3 = 1740;
                            while (true) {
                                i3 ^= 1757;
                                switch (i3) {
                                    case 17:
                                        i3 = !find ? 1833 : 1802;
                                    case 54:
                                    case 471:
                                        String group = matcher.group(1);
                                        JSONObject jSONObject2 = new JSONObject();
                                        jSONObject2.put(C0008.m27(f18short, 1490, 6, 1512), group);
                                        jSONObject2.put(C0005.m17(f18short, 1496, 8, 987), I);
                                        jSONObject2.put(C0007.m26(f18short, 1504, 7, 3129), "");
                                        jSONObject2.put(C0017.m52(f18short, 1511, 11, 2642), I2);
                                        jSONArray.put(jSONObject2);
                                        break;
                                    case 500:
                                        int i4 = 1864;
                                        while (true) {
                                            i4 ^= 1881;
                                            switch (i4) {
                                                case 17:
                                                    i4 = 48674;
                                                case 47483:
                                                    break;
                                            }
                                            break;
                                        }
                                        break;
                                }
                            }
                            int i5 = i + 1;
                            int i6 = 48767;
                            while (true) {
                                i6 ^= 48784;
                                switch (i6) {
                                    case 14:
                                        break;
                                    case 239:
                                        i6 = 48798;
                                }
                            }
                            i = i5;
                            break;
                        case 239:
                            break;
                    }
                    jSONObject.put(C0005.m17(f18short, 1522, 4, 558), jSONArray);
                    return jSONObject.toString();
                }
            }
        } catch (Exception e) {
            SpiderDebug.log(e);
            return "";
        }
    }
}
